package com.ctbri.arrays;

import java.math.BigDecimal;
import java.util.Arrays;

import com.ctbri.util.Generator;

class BigDecimalGenerator implements Generator<BigDecimal> {
	private BigDecimal value = new BigDecimal(0);
	private BigDecimal step;
	public BigDecimalGenerator(BigDecimal step) {
		this.step = step;
	}
	public BigDecimal next() {
		BigDecimal oldValue = value;
		value = value.add(step);
		return oldValue;
	}
}
public class Ex17 {
	public static void main(String[] args) {
		BigDecimal[] bs = Generated.array(BigDecimal.class, new BigDecimalGenerator(new BigDecimal(1.1)), 15);
		System.out.println(Arrays.toString(bs));
	}
}
